﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
          
            
            Student student = new Student();
            student.name = "张三";
            student.age = 17;
            Student student1 = new Student();
            student1.name = "李四";
            student1.age = 16;
            student.Test(student1.name, student1.age);
            Student student2 = new Student();
            student2.name = "王五";
            student2.age = 15;
            Student student3 = new Student();
            student3.name = "赵六";
            student3.age = 18;
            Student student4 = new Student();
            student4.name = "小米";
            student4.age = 17;
            Student student5 = new Student();
            student5.name = "小三";
            student5.age = 16;
         
            Console.WriteLine("换老师前");
            Student.teacher = "唐僧";
            student.Test(student.name,student.age);
            student1.Test(student2.name, student2.age);
            student2.Test(student3.name, student3.age);
            student3.Test(student4.name, student4.age);
            student4.Test(student.name, student.age);
            student5.Test(student.name, student.age);

            Console.WriteLine("换老师后");
            Student.teacher = "嫦娥";

            student.Test(student.name, student.age);
            student1.Test(student2.name, student2.age);
            student2.Test(student3.name, student3.age);
            student3.Test(student4.name, student4.age);
            student4.Test(student.name, student.age);
            student5.Test(student.name, student.age);
        }
    }
    class Student
    {
       public string name;
       public int age;

        public static string teacher;
        public Student() { }
        public Student(string name,int age) {
            name = this.name;
            age = this.age;
           
        }
        public void Test(string name,int age)
        {
            Console.WriteLine("姓名："+this.name+" "+"年龄"+this.age+" "+"老师："+Student.teacher);
        }

    }

}
